package com.cqut.service;

import java.util.List;
import java.util.Map;

import com.cqut.dto.LimitShowDTO;
import com.cqut.dto.LoginInfoDTO;
import com.cqut.dto.UserDTO;
import com.cqut.model.User;

public interface IUserService {
    boolean save(User user);

    boolean update(User user);

    boolean delete(String userId);

    boolean batchDelete(String[] primaryKeys);

    User findModel(String userId);

    User findModel(String userId, String[] parameters);

    Map<String, Object> findMap(String userId);

    Map<String, Object> findMap(String userId, String[][] parameters);

    List<User> loadModels();

    List<User> loadModels(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<User> loadModels(String[] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps();

    List<Map<String, Object>> loadMaps(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps(String[][] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    long count();

    long count(String condition, Object[] values);

    long count(String[] parameters, boolean isDistinct);

    long count(String[] parameters, String condition, Object[] values, boolean isDistinct);

	List<Map<String, Object>> findUsersWithLimit(UserDTO userDTO,
			LimitShowDTO limitShowDTO);

	Map<String, Object> findUserById(String curUserid);

	List<Map<String, Object>> searchForUser(UserDTO userDTO,
			LimitShowDTO limitShowDTO);

	Object findCountOfUsers(UserDTO userDTO);

	Object updatePassword(LoginInfoDTO loginInfoDTO, String password,
			String oldPassword);

	boolean startUserById(String userId);

	boolean forbiddenUserById(String userId);

	boolean duplicateCheckingUserCode(String validationDate);

	boolean duplicateCheckingUserName(String validationDate);

	Map<String, Object> getToken(LoginInfoDTO loginInfoDTO);

	boolean judgePassword(LoginInfoDTO loginInfoDTO);

	Object updateUser(LoginInfoDTO loginInfoDTO, UserDTO userDTO);

	List<Map<String, Object>> getRole();

	Map<String, Object> deleteUsers(String[] userIds);

	boolean userAdd(UserDTO userDTO);


}
